\(\int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx\) [1032]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 36 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 e} \]

[Out]

1/2*(e*x+d)*(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2)/e

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {623} \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 e} \]

[In]

Int[Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2],x]

[Out]

((d + e*x)*Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2])/(2*e)

Rule 623

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1)
)), x] /; FreeQ[{a, b, c, p}, x] && EqQ[b^2 - 4*a*c, 0] && NeQ[p, -2^(-1)]

Rubi steps \begin{align*} \text {integral}& = \frac {(d+e x) \sqrt {c d^2+2 c d e x+c e^2 x^2}}{2 e} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.86 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\frac {c x (d+e x) (2 d+e x)}{2 \sqrt {c (d+e x)^2}} \]

[In]

Integrate[Sqrt[c*d^2 + 2*c*d*e*x + c*e^2*x^2],x]

[Out]

(c*x*(d + e*x)*(2*d + e*x))/(2*Sqrt[c*(d + e*x)^2])

Maple [A] (verified)

Time = 2.28 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.11

method result size
gosper \(\frac {x \left (e x +2 d \right ) \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}{2 e x +2 d}\) \(40\)
default \(\frac {x \left (e x +2 d \right ) \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}{2 e x +2 d}\) \(40\)
trager \(\frac {x \left (e x +2 d \right ) \sqrt {c \,x^{2} e^{2}+2 x c d e +c \,d^{2}}}{2 e x +2 d}\) \(40\)
risch \(\frac {\sqrt {c \left (e x +d \right )^{2}}\, e \,x^{2}}{2 e x +2 d}+\frac {\sqrt {c \left (e x +d \right )^{2}}\, d x}{e x +d}\) \(47\)

[In]

int((c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*x*(e*x+2*d)*(c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2)/(e*x+d)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.14 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\frac {\sqrt {c e^{2} x^{2} + 2 \, c d e x + c d^{2}} {\left (e x^{2} + 2 \, d x\right )}}{2 \, {\left (e x + d\right )}} \]

[In]

integrate((c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(c*e^2*x^2 + 2*c*d*e*x + c*d^2)*(e*x^2 + 2*d*x)/(e*x + d)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (34) = 68\).

Time = 0.36 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.97 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\begin {cases} \left (\frac {d}{2 e} + \frac {x}{2}\right ) \sqrt {c d^{2} + 2 c d e x + c e^{2} x^{2}} & \text {for}\: c e^{2} \neq 0 \\\frac {\left (c d^{2} + 2 c d e x\right )^{\frac {3}{2}}}{3 c d e} & \text {for}\: c d e \neq 0 \\x \sqrt {c d^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate((c*e**2*x**2+2*c*d*e*x+c*d**2)**(1/2),x)

[Out]

Piecewise(((d/(2*e) + x/2)*sqrt(c*d**2 + 2*c*d*e*x + c*e**2*x**2), Ne(c*e**2, 0)), ((c*d**2 + 2*c*d*e*x)**(3/2
)/(3*c*d*e), Ne(c*d*e, 0)), (x*sqrt(c*d**2), True))

Maxima [F(-2)]

Exception generated. \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\frac {1}{2} \, {\left ({\left (e x^{2} + 2 \, d x\right )} \mathrm {sgn}\left (e x + d\right ) + \frac {d^{2} \mathrm {sgn}\left (e x + d\right )}{e}\right )} \sqrt {c} \]

[In]

integrate((c*e^2*x^2+2*c*d*e*x+c*d^2)^(1/2),x, algorithm="giac")

[Out]

1/2*((e*x^2 + 2*d*x)*sgn(e*x + d) + d^2*sgn(e*x + d)/e)*sqrt(c)

Mupad [B] (verification not implemented)

Time = 9.94 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92 \[ \int \sqrt {c d^2+2 c d e x+c e^2 x^2} \, dx=\left (\frac {x}{2}+\frac {d}{2\,e}\right )\,\sqrt {c\,d^2+2\,c\,d\,e\,x+c\,e^2\,x^2} \]

[In]

int((c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^(1/2),x)

[Out]

(x/2 + d/(2*e))*(c*d^2 + c*e^2*x^2 + 2*c*d*e*x)^(1/2)